home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 37 / CD Expert nº 37.iso / LastCall / lastcall.exe / stuff / lastcall.dxr / 00067_Love Meter.ls < prev    next >
Encoding:
Text File  |  2000-03-27  |  1.5 KB  |  75 lines

  1. property pTimer, pSpr
  2.  
  3. on beginSprite me
  4.   pSpr = sprite(me.spriteNum)
  5. end
  6.  
  7. on mouseEnter me
  8.   showDrinkContents(#progmeter)
  9.   if not draggingIngredient() then
  10.     pTimer = nowTicks()
  11.     showToolTip(pSpr, #progmeter)
  12.   end if
  13. end
  14.  
  15. on mouseLeave me
  16.   if not draggingIngredient() then
  17.     hideToolTip()
  18.   end if
  19. end
  20.  
  21. on mouseWithin me
  22.   if the mouseDown then
  23.     exit
  24.   end if
  25.   refreshHelpWindow(#progmeter)
  26.   if draggingIngredient() then
  27.   else
  28.     if tipTickRange(pTimer) then
  29.       customToolTip(me, #left)
  30.     else
  31.       dismissToolTip()
  32.     end if
  33.   end if
  34. end
  35.  
  36. on mouseDown me
  37.   if draggingAnything() then
  38.     replaceDraggingAnything()
  39.     exit
  40.   end if
  41.   repeat while the stillDown
  42.     refreshHelpWindow(#progmeter)
  43.     if commandOrControlDown() then
  44.       customToolTip(me, #limit)
  45.     else
  46.       if the shiftDown then
  47.         customToolTip(me, #Current)
  48.       else
  49.         customToolTip(me, #left)
  50.       end if
  51.     end if
  52.     updateStage()
  53.     checkElapsedTime()
  54.   end repeat
  55. end
  56.  
  57. on customToolTip me, tipType
  58.   global gBonusLimit, gBonusStartTime, gToolTip
  59.   laserLoc = point(300, 400)
  60.   if inRecipeMode() then
  61.     tipType = #none
  62.   end if
  63.   case tipType of
  64.     #left:
  65.       tipText = "Time Left:" & RETURN & displayTimeUnits(timeLeftOnThisLevel(), 1)
  66.     #limit:
  67.       tipText = "Max Time:" & RETURN & displayTimeUnits(maxTimeOnThisLevel(), 1)
  68.     #Current:
  69.       tipText = "Elapsed:" & RETURN & displayTimeUnits(timeOnThisLevel(), 1)
  70.     #none:
  71.       tipText = "No Time Limit"
  72.   end case
  73.   sendSprite(gToolTip, #mShowToolTip, pSpr, tipText, laserLoc)
  74. end
  75.